package com.hspedu.homework;

public class HomeWork03 {
    public static void main(String[] args) {

        Professor professor = new Professor("刘金涛", 19, "教授", 10000);
        professor.introduce();

        Ass_Professor ass_professor = new Ass_Professor("高晶晶", 19, "副教授", 10000);
        ass_professor.introduce();

        Lecturer lecturer = new Lecturer("冯捷", 19, "讲师", 10000);
        lecturer.introduce();

    }
}


class Teacher {

    private String name;
    private int age;
    private String post;
    private double salary;

    //构造器
    public Teacher() {}

    public Teacher(String name, int age, String post, double salary) {
        this.name = name;
        this.age = age;
        this.post = post;
        this.salary = salary;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getPost() {
        return post;
    }

    public void setPost(String post) {
        this.post = post;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    //输出信息
    public void introduce() {
        System.out.println(name + post + age + "岁，" + "，基本工资为" + salary);
    }

}


class Professor extends Teacher {

    private double salLev = 1.3;

    public Professor(String name, int age, String post, double salary) {
        super(name, age, post, salary);
    }

    @Override
    public void introduce() {
        System.out.println(getName() + getPost() + getAge() + "岁，" + "，工资为" + getSalary() * salLev);
    }

}


class Ass_Professor extends Teacher {

    private double salLev = 1.2;

    public Ass_Professor(String name, int age, String post, double salary) {
        super(name, age, post, salary);
    }

    @Override
    public void introduce() {
        System.out.println(getName() + getPost() + getAge() + "岁，" + "，工资为" + getSalary() * salLev);
    }

}


class Lecturer extends Teacher {

    private double salLev = 1.1;

    public Lecturer(String name, int age, String post, double salary) {
        super(name, age, post, salary);
    }

    @Override
    public void introduce() {
        System.out.println(getName() + getPost() + getAge() + "岁，" + "，工资为" + getSalary() * salLev);
    }

}